
import extract_msg

extract_msg.Message()
# 读取单个msg文件
msg = extract_msg.Message("example.msg")
print("发件人:", msg.sender)
print("主题:", msg.subject)
print("正文:", msg.body)

msg.save()
# 保存附件
for attachment in msg.attachments:
    attachment.save(customPath='./attachments')



